<?php
/**
 * Created by PhpStorm.
 * User: Yui
 * Date: 2017/5/13 0013
 * Time: 15:42
 */

namespace common\services;


use common\models\Version;

class VersionSve extends BaseSve
{
    public function getLatest($where):array
    {
        $LatestVersion = Version::find()->where($where)->orderBy('create_time DESC')->one();
        if (empty($LatestVersion)) {
            return self::result('获取失败');
        } else {
            return self::result('获取成功', 0, $LatestVersion);
        }
    }
}